<template>
    <el-config-provider :locale="zhCn">
        <app-base :async-routes="asyncRoutes" :isShowWatermark="isShowWatermark"></app-base>
    </el-config-provider>
</template>

<script lang="ts">
import { Component, defineComponent, computed, ref } from 'vue';
import { ElConfigProvider } from 'element-plus';
import AppBase from '@x-tech/fe-starter-pc-shadow/src/components/AppBase/index.vue';
import zhCn from 'element-plus/lib/locale/lang/zh-cn';
import { asyncRoutes } from '@/router';
import useTheme from '@/hooks/useTheme';
import { useStore } from 'vuex';

export default defineComponent({
    components: {
        'app-base': AppBase as unknown as Component,
        ElConfigProvider,
    },
    setup() {
        const store = useStore();
        useTheme();
        let isShowWatermark = computed(() => store.state.app?.config?.isShowGlobalWaterMark);
        return {
            asyncRoutes,
            zhCn,
            isShowWatermark,
        };
    },
});
</script>
